package cn.jdy.plugins.service;

import cn.jdy.framework.db.hibernate.BaseDao;
import cn.jdy.plugins.entity.Company;

import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @title : 企业信息实现类
 * @description :
 * @author: wuzhiliang
 * @date: 2014-03-13 16:53
 */
@Service
public class CompanyService extends BaseDao<Company> {


	/**
	 * 查询企业列表 不分页
	 *
	 * @return
	 */
	public List<Company> findCompanyList() {
		List<Company> list = null;
		try {
			// 过滤与分页
		  DetachedCriteria dc = DetachedCriteria.forClass(entityClass);
      dc.addOrder(Order.asc("id"));
			list = super.find(dc);
		} catch(Exception e) {

		}
		return list;
	}


}
